import * as socket from 'socket.io';
import * as Http from 'http';
import * as express from 'express';


(async () => {
  const app = express();
  const http = Http.createServer(app);
  const io = socket(http);
  app.use(express.static(__dirname + '/static'));
  app.get('/', (req, res) => res.sendFile(__dirname + '/index.html'));
  app.get('/static/*', (req, res) => res.sendFile(__dirname + req.path));

  io.on('connection', (socket) => {
    console.log('A User Connected', socket.id);
    socket.on('wlan link', async (id: number | number[]) => {

    });
  });
  http.listen(3556, () => console.log('listening on *:3556'));
})();